# include <stdio.h>
# include <stdlib.h>

typedef struct LinkStack * linkStack;
struct LinkStack{
    int data;
    linkStack next;
};

linkStack push(linkStack stack, int a);
linkStack pop(linkStack stack);

int main(void)
{

    return 0;
}

linkStack push(linkStack stack, int a)
{
    linkStack p = (linkStack)malloc(sizeof(struct LinkStack));
    p->data = a;
    p->next = stack;
    stack = p;

    return stack;
}

linkStack pop(linkStack stack)
{
    if(!stack)
    {
        printf("空栈！\n");
        return stack;
    }
    linkStack p = stack;
    stack = stack->next;
    free(p);
    if(stack)
        printf("新栈顶元素！");
    else
    {
        printf("空栈！\n");
    }

    return stack;
}
